Conversation
|
The changelog says indeed:
We could change the |
|
What do you mean with The problem is that at some locations our API is not clearly stating if the expected parameters should be in the query, body, ... . So migrating away from get(), which checks all possible sources, might be hard. |
see: laravel/framework#57962 (comment) :) But that might only works with Laravel too bad :( But yea, I get your point, we now need to migrate to, which isn't always easy to know what to pick from the code: // use this if the value comes from route placeholders or custom attributes
$value = $request->attributes->get('some_key');
// use this for GET query parameters
$value = $request->query->get('some_key');
// use this for POST-submitted data
$value = $request->request->get('some_key'); |
Yep, there is no |
The deprecation
User Deprecated: Since symfony/http-foundation 7.4: Request::get() is deprecatedcan be safely ignored as the function is not terminally deprecated (for now) and also not malfunctioning. The message about this deprecation is spamming the logs, especially on dev as it is triggered for every usage in every request.Migrating away from the function would be time-consuming, as we use it a lot and kinda rely on it current behavior.